package com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.mapper;

import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FlowFormProcessInstanceHandleRel;
import com.iwhalecloud.citybrain.flow.platform.manager.infrastructure.entities.FormProcessInstanceHandleRelExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
　　* @description: 批量插入
　　* @author shenrm
　　* @date 2021/10/19 17:41
　　*/
public interface FormProcessInstanceHandleRelDAO {

    /**
     * 批量插入
     *
     * @param flowProcessInstanceHandleRelList
     * @return
     */
    int batchInsert(List<FlowFormProcessInstanceHandleRel> flowProcessInstanceHandleRelList);

    /**
     * 查询数据
     *
     * @param example
     * @return
     */
    List<FlowFormProcessInstanceHandleRel> selectByExample(FormProcessInstanceHandleRelExample example);

    /**
     * 根据流程实例ID或流程实例节点ID和处理人ID集合更新处理关系数据信息列表状态为已读
     *
     * @param record
     * @param example
     * @return
     */
    int updateByExampleSelective(@Param("record") FlowFormProcessInstanceHandleRel record, @Param("example") FormProcessInstanceHandleRelExample example);


    /**
     * 统计查询数据数量
     *
     * @param example
     * @return
     */
    int countByExample(FormProcessInstanceHandleRelExample example);

    /**
     * 清除阅办信息
     *
     * @param processInstanceId
     * @param nodeCode
     * @return
     */
    void deleteInfo(String processInstanceId, String nodeCode);
}
